﻿@model CSF.Security.Data.UserAccount
@{
    ViewBag.Title = "MyAccount";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    My Account</h2>
<p>
    Change email and name, or change @Html.ActionLink("Password", "ChangePassword", new { toUrl = ViewBag.ToUrl }) 
    or @Html.ActionLink("Details", "MyDetail", "Customer", new { toUrl = ViewBag.ToUrl }, null).
</p>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>UserAccount</legend>

        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.UserName)

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
